﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Controller;

namespace Facade.Validator
{
    public class WeightValidator
    {
        public string ValidateWeight(Employee employees, KPIAssign Assign, int year)
        {
            string msg = "OK";
            KPIAssignController cont = new KPIAssignController();
            if (!cont.ValidateWeight(employees, Assign, year))
                msg = "Invalid assignment, the weight limit has been reached";
            return msg;
        }

        public string ValidateWeightDua(Employee employees, int Weight, int year)
        {
            string msg = "OK";
            KPIAssignController cont = new KPIAssignController();
            if (!cont.ValidateWeightDua(employees, Weight, year))
                msg = "Invalid assignment, the weight limit has been reached";
            return msg;
        }
    }
}